Repository navigation
core: start gloas attester consensus at slot start - #4769
Conversation
a4bdc93 to
7f8c79e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## kalo/round-timer-refactor #4769 +/- ##
=============================================================
+ Coverage 66.76% 66.95% +0.18%
=============================================================
Files 250 250
Lines 32289 32377 +88
=============================================================
+ Hits 21559 21677 +118
+ Misses 10729 10699 -30
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bb6d1e5 to
523702b
Compare
523702b to
bc51f45
Compare
|
There was a problem hiding this comment.
🟡 Changes recommended
Sequential callbacks delay consensus participation, while timing races can miss or postpone head-event fetching.
4 open findings
What changed in this PR
Adds Gloas-specific attester timing so consensus can begin at slot start and fetch attestation data from SSE head events.
Changes:
- Adds the
eager_ahead_splitconsensus timer. - Adds head-event fetching with deadline fallback.
- Stabilizes
fetch_att_on_blockand expands tests/documentation.
| File | Description |
|---|---|
app/app.go |
Wires Gloas head events into the fetcher. |
app/featureset/featureset.go |
Stabilizes and consolidates attestation fetching flags. |
core/consensus/qbft/qbft.go |
Supplies fork timing to round timers. |
core/consensus/qbft/qbft_internal_test.go |
Updates timer construction tests. |
core/consensus/qbft/roundtimer_internal_test.go |
Tests Gloas rounds in QBFT. |
core/consensus/timer/extensions.go |
Adds per-round rearm extension behavior. |
core/consensus/timer/roundtimer.go |
Selects fork-aware timers and anchors. |
core/consensus/timer/roundtimer_internal_test.go |
Tests durations, anchors, and extensions. |
core/consensus/timer/roundtimer_test.go |
Tests fork-aware timer selection. |
core/consensus/timer/timers.go |
Defines the ahead-split timer. |
core/fetcher/fetcher.go |
Implements Gloas head-event fetching and fallback. |
core/fetcher/fetcher_internal_test.go |
Tests the new fetching flow. |
core/fetcher/fetcher_test.go |
Updates fetcher construction. |
core/interfaces.go |
Annotates legacy pre-Gloas wiring. |
core/scheduler/scheduler.go |
Starts Gloas attester duties at slot start. |
core/scheduler/scheduler_internal_test.go |
Tests fork-aware head handling. |
core/scheduler/scheduler_test.go |
Tests Gloas scheduling without offset delay. |
docs/consensus.md |
Documents Gloas timer semantics. |
testutil/integration/simnet_test.go |
Adds Gloas attester integration coverage. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
OisinKyne
left a comment
There was a problem hiding this comment.
LGTM, nothing blocking here but just worth considering
- The 3s interval is hard-coded, but the duty offsets are calculated as a fraction of the slot length. That's fine on every 12s network, including the kurtosis deployments (seconds_per_slot: 12). On 5s Gnosis/Chiado, round 1 would start in the previous slot. A cheap guard would be to use eager_dlinear whenever the slot isn't 12s.
- The PR description and the code disagree on the re-arm extension. The description says extend_on_rearm_1s; the code is double_round_on_rearm_min_1s, which doubles rounds 4 and up (round 4 gets +2s). Your (Oisin) notes said a fixed re-arm is probably better than doubling, so either make it a fixed 1s or fix the description.
- A head event that arrives before the fetcher is waiting gets dropped. It falls back to the 3s path, so nothing breaks, but keeping the latest head event per slot would be a cheap fix.
- There's no metric yet for decision time relative to slot start, or for the share of duties decided before the due time, so we can't confirm the improvement on Hoodi.
51f19ea
into
kalo/round-timer-refactor





From the gloas fork, attester consensus starts at the start of the slot with the new
eager_ahead_splittimer (rounds of 4s, 1s, 1s, then +1s per round; a re-armed round is extended by its duration past the attestation due time, at least 1s,double_round_on_rearm_min_1s), and the fetcher fetches attestation data on the slot's SSE head event, or at the attestation deadline if no block arrived.fetch_att_on_blockbecomes stable andfetch_att_on_block_with_delayis removed. Stacked on #4767.category: feature
ticket: #4324